import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "Faculties")
public class Faculty {
	@Id
	@Column(name= "faculty_id")	
	private Integer faculty_id;
		
	@Column(name= "faculty_name")
	private String faculty_name;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "univ_id")
	private University univer;
		
	//getters
	
	public Integer getId(){return this.faculty_id;}
	
	public String getName(){return this.faculty_name;}
	
	public University getUniversity(){return this.univer;}
	
	//setters
	
	public void setId(Integer id) {this.faculty_id = id;}
	
	public void setName(String name) {this.faculty_name = name;}
	
	public void setUniversity(University univer) {this.univer = univer;}
	
}
